Skip to content

Docs Content Updates#185

Open
skarim wants to merge 5 commits into
mainfrom
skarim/docs-content-updates
Open

Docs Content Updates#185
skarim wants to merge 5 commits into
mainfrom
skarim/docs-content-updates

Conversation

@skarim

@skarim skarim commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Batch of updates to the Stacked PRs docs site.

Overview of updates

Clarified how merging works

  • Atomic multi-PR merges. Reworded the merge guidance so it's clear that merging a PR lands that PR and every unmerged PR below it in a single atomic operation, and that the whole stack can be merged in one click. Removed wording that implied PRs must be merged one at a time.

Standardized terminology

  • "Stack map." Standardized on "stack map" for the PR-header stack UI component, replacing "stack navigator" across the docs.

Expanded the webhooks reference

  • Full stack object. Documented the complete stack object on the pull_request payload: id, number, size, position (1 = bottom), and base (ref, sha).
  • New stacked event. Added a section for the pull_request event with the stacked action, which fires when a PR is added to a stack, including its top-level stack object.
  • Optimizing CI usage. Added guidance on using the stack fields to gate workflow steps — for example, running CI only for the lowest unmerged PR or the top PR of a stack.

Added a REST API reference page

  • stack object on pull requests. Documented that pull request resources include a stack object on both the detail and list endpoints, with a field table and the null behavior for standalone PRs.
  • Stacks API. Documented the stack endpoints: list (with the pull_request filter), get, create, add, and unstack — including request bodies, status codes, and the stack resource shape.
  • Added the new page to the Reference section of the sidebar.

Added a GraphQL API reference page

  • Read-only stack fields and objects. Documented the stack and stackEntry fields on the PullRequest type, and the PullRequestStack, PullRequestStackEntry, PullRequestStackEntryConnection, and PullRequestStackEntryEdge objects, with a sample query. These are read-only — there are no stack mutations. Added the page to the Reference sidebar.

Updated the FAQ

  • GitHub Actions expressions. Expanded the stack metadata available in workflow expressions (number, size, position, base) with examples, and cross-linked the webhooks and REST API references.
  • CI optimization. Added a "How can I optimize CI usage for a stack?" question showing how to gate jobs by stack position — running full checks only on the lowest unmerged PR or the top PR.

Pages touched

  • Homepage
  • Introduction / Overview
  • Working with Stacked PRs
  • Stacked PRs in the GitHub UI
  • FAQ
  • Reference / Webhooks (expanded)
  • Reference / REST API (new)
  • Reference / GraphQL API (new)

@skarim
skarim force-pushed the skarim/docs-content-updates branch from 93b07ff to 22033fa Compare July 23, 2026 22:36
@skarim
skarim marked this pull request as ready for review July 23, 2026 23:33
Copilot AI review requested due to automatic review settings July 23, 2026 23:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Stacked PR documentation for current merge behavior, terminology, APIs, webhooks, and CI guidance.

Changes:

  • Standardizes “stack map” terminology and merge guidance.
  • Adds REST and GraphQL API references.
  • Expands webhook, stack metadata, and CI optimization documentation.
Show a summary per file
File Description
docs/astro.config.mjs Adds API reference pages to navigation.
docs/src/content/docs/index.mdx Updates homepage terminology and merging guidance.
docs/src/content/docs/introduction/overview.md Clarifies stack merging behavior.
docs/src/content/docs/guides/ui.md Standardizes stack map terminology.
docs/src/content/docs/guides/stacked-prs.md Revises practical merging instructions.
docs/src/content/docs/faq.md Expands metadata and CI guidance.
docs/src/content/docs/reference/webhooks.md Documents stack fields and stacked events.
docs/src/content/docs/reference/rest-api.md Adds the Stacks REST API reference.
docs/src/content/docs/reference/graphql-api.md Adds the read-only GraphQL reference.

Review details

  • Files reviewed: 9/9 changed files
  • Comments generated: 5
  • Review effort level: Medium

run: echo "Lowest unmerged PR in the stack"

- name: Run for the top PR in the stack
if: github.event.pull_request.stack.position == github.event.pull_request.stack.size
run: echo "Lowest unmerged PR in the stack"

- name: Run for the top PR in the stack
if: github.event.pull_request.stack.position == github.event.pull_request.stack.size

## Example

Read a pull request's stack, its position, and every pull request in the stack:

### The stack resource

The list, get, create, add, and unstack endpoints all return the stack resource:
### Merging Stacks

The entire stack does not need to be merged at once, but PRs must be merged **from the bottom up**. GitHub supports two merge methods:
You can merge your entire stack, a single PR, or a portion of the stack spanning multiple PRs. When you click **Merge** on any PR, that PR **and every unmerged PR below it land together in a single atomic operation**. So you can:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants